package miracle.joker.design.chain_of_responsibility;

public class UploaderChain {
    private Uploader uploader;

    public UploaderChain() {
        FileSizeChecker fileSizeChecker = new FileSizeChecker();
        FileTypeChecker fileTypeChecker = new FileTypeChecker();
        FileNameChecker fileNameChecker = new FileNameChecker();

        fileSizeChecker.setNext(fileTypeChecker);
        fileTypeChecker.setNext(fileNameChecker);

        this.uploader = fileSizeChecker;
    }

    public void upload(File file) {
        uploader.upload(file);
    }
}
